package com.commerce.reader.ui.notifications;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.commerce.reader.Entity.Book;

import org.litepal.LitePal;

import java.util.List;

public class NotificationsViewModel extends ViewModel {


    private MutableLiveData<List<Book>> mBooks;

    public NotificationsViewModel() {
        mBooks = new MutableLiveData<>();
        List<Book> all = LitePal.findAll(Book.class);
        mBooks.setValue(all);
    }

    public LiveData<List<Book>> getList() {

        return mBooks;
    }
}